package net.wanho.task;

import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

@Component
public class AsyncTask {

    @Async // 表示该方法是一个异步任务
    public void doTask() {
        System.out.println("异步任务--------" + Thread.currentThread().getName());
    }

}